<template>
  <business-layout>
    <h1>这是  可研收口 页面</h1>
    <a href="/feasibilityStudy/organizationManagement">可研编制</a>
    <router-link to="/feasibilityStudy/organizationManagement">router 可研编制</router-link>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="date" label="Date" width="180" />
      <el-table-column prop="name" label="Name" width="180" />
      <el-table-column prop="address" label="Address" />
    </el-table>
  </business-layout>
</template>

<script >
import {ref } from 'vue'
import { useIndexStore } from '@/pinia-store'
import businessLayout from '@/components/businessLayout/index.vue'
import { useBasicData } from '@/pinia-store'
export default {
  components: {businessLayout},
  props: {
    fetchData: {
      type: Object,
      default: () => ({})
    }
  },
  setup(props, {attrs}){

    const indexStore = useIndexStore()

    const indexData = indexStore.data

    const tableData = ref([
      {
        date: '2016-05-03',
        name: 'Tom',
        address: 'No. 189, Grove St, Los Angeles',
      },
      {
        date: '2016-05-02',
        name: 'Tom',
        address: 'No. 189, Grove St, Los Angeles',
      },
      {
        date: '2016-05-04',
        name: 'Tom',
        address: 'No. 189, Grove St, Los Angeles',
      },
      {
        date: '2016-05-01',
        name: 'Tom',
        address: 'No. 189, Grove St, Los Angeles',
      }
    ])

    // console.log('props.fetchData' + new Date().getTime())
    // console.log(props.fetchData)

    const a = useBasicData()

    console.log('a', a, a.data)

    if( __isBrowser__ ){
      console.log('test  客户端 setup 执行')
    }

    return {
      indexData,
      tableData
    }
  }
}

</script>
